import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from '@/store';
import VueRouter from 'vue-router';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css'; // 默认主题
// import './assets/css/theme-green/index.css'; // 浅绿色主题
import './assets/css/icon.css';
import 'babel-polyfill';
// import '@/mock/index'
import '@/utils/v-allow';
// import  '@/permission.js'

Vue.config.productionTip = false;
const originalPush = VueRouter.prototype.push;
VueRouter.prototype.push = function push(location, onResolve, onReject) {
    if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject);
    return originalPush.call(this, location).catch(err => err);
};
Vue.use(ElementUI, {
    size: 'small'
});

new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app');
